<!doctype html>
{% load static %}
<html>
<head>
    <meta charset="utf-8">
    <title>MyStarSpace</title>
    
    <style type="text/css">
       @import url("{% static 'talks/css/star.css' %}");
       @import url("{% static 'talks/css/space.css' %}")
    </style>
<script  src="{% static 'talks/js/jquery-3.3.1.min.js' %} ">
        $("#write").toggle();
        //console.log(ifo);
        //appendInner(ifo);
        // appendInner(inf2);
        // appendInner(inf);    
        // appendInner(inf2);
        // appendInner(inf);
        // appendInner(inf2);
        $("#content").append("<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>");
</script>
   
    </head>
<body>
    <canvas id="canvas"></canvas>
    
    <div id="moon" draggable="true">
        <img id = moonPic src="{% static 'talks/image/moon/moon6.png' %}" width="50%" height="50%" alt="TheMoon" >
    </div>
    
    <div>
		<img src="{% static 'talks/image/exit.png' %}" id="exit" onclick="window.location.href='/'" />
	</div>
	<div>
		<img src="{% static 'talks/image/add.png' %}" id="add"  />
	</div>
    
    <div id="adjBox">
    <form id="adjustForm">
        <fieldset style="width: 200%">
      <legend>Console information:</legend>
            <br>
            <input hidden="hidden" name="flag" value=0>
            
            星星的数量: <input type="text" name="num" value=""><br>
            星星的尺寸: <input type="text" name="dotSize" value=""><br>
            星星的速度: <input type="text" name="speed" value=""><br>
            星星的颜色: <input type="text" name="dotColor" value=""><br>
            线条的颜色: <input type="text" name="colorList" value=""><br>
            线条连线长: <input type="text" name="lineDotL" value=""><br>
            鼠标连线长: <input type="text" name="lineMousL" value=""><br>
            
            <span>moonStyle:</span>
            <select name="moonStyle">
               <option value="1">style1</option>
               <option value="2">style2</option>
               <option value="3" >style3</option>
               <option value="4">style4</option>
                <option value="5">style5</option>
                <option value="6" selected>style6</option>
            </select><br>
            
             <span>dotStyle  : </span>
            <input type="radio" name="dotStyle" value="fill" checked="checked"> fill 
            <input type="radio" name="dotStyle" value="scroke" > stroke <br>
          
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<input type="button" value="提交" onclick="change()">
        
        </fieldset>
    </form >
    </div>
    
    <div id = welcome>
        <img src="{% static 'talks/image/welcome.png' %} ">
    </div>
   
    
    <div id = 'content'>

    </div>
    
    <div id="write">
            <textarea id = "text" type="textar" name="num" value="111">请输入动态消息</textarea><br /><br />
            <button id="reset">取消</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button id="send">发送</button>
    </div>
    
    </body>

    <script text/javascripe src="{% static 'talks/js/star.js' %}" charset="utf-8">     
    </script>

   <script src="{% static 'talks/js/jquery-3.3.1.min.js' %} "></script>
       
    <script src = "{% static 'talks/js/space.js' %}"> 
    <!-- <script src = "{% static 'talks/js/space.js' %}">  -->
    </script>

    <script>
        fetch('/content').then(e => e.json()).then(e => {
            console.log(e)
            for(i=0;i<e.length;i++){
                appendInner(e[i]);
            }
            $("#write").toggle();
            $("#content").append("<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>");
        });
        ID={{account}}
        setTimeout(function(){
            $(".comPic").click(function() {
        
                $("#write").toggle()
                des['flag'] = 0

                <!-- des['nid'] = $(this).parent().parent().attr("NID") -->

                des['nid'] = $(this).parent().parent().find(".texx").html()
                des['cid'] = ''
                des['this'] = $(this).parent().next()
                $("#text").val("评论" + des['nid'])
            })
        },1000)
        
        setTimeout(function(){
            $(".comT").click(function() {
                $("#write").toggle()
                des['flag'] = 0
                des['nid'] = $(this).parents(".inner").find(".texx").html()
                des['cid'] = $(this).attr('CID')
                des['this'] = $(this).parent()
                $("#text").val("回复" + des['cid'])
            
            })
        },1000)
       
    </script>
    
    
</html>